package day0327;

import java.util.Arrays;
public class Test6 {

    public static void main(String[] args) {
        String[] result = new String[9];
        generateArray(result, 0);
        System.out.println(Arrays.toString(result));
    }

    //index0  给arr的第0位放入元素
    public static void generateArray(String[] arr, int index) {
        if (index >= arr.length) {
            return;
        }else{
            arr[index] = (index + 1) + "/" + (index + 2);//1/2
            System.out.println((index + 1) + "/" + (index + 2));
            generateArray(arr, index + 1);
        }
    }






   /*
    public static void main(String[] args) {
        int[]  arr=new int[9];//1.......9
        getNum(arr, 8);
        System.out.println(Arrays.toString(arr));
    }

    public static int getNum(int[] ar,int  index) {
        if(index==0){
            return ar[0]=1;
        }else{
            return ar[index]=  (getNum(ar,  index-1)+1);
        }
    }*/

}
